using UnityEngine;

public class AddGameObjectAsSon : MonoBehaviour
{
	public GameObject prefab;

	private void OnDrawGizmos()
	{
		if (!(prefab == null))
		{
			GameObject gameObject = UnityEngine.Object.Instantiate(prefab);
			gameObject.transform.SetParent(base.transform, worldPositionStays: false);
			UnityEngine.Object.DestroyImmediate(this);
		}
	}
}
